<template>
  <div class="rq">
    <div class="rq-item" v-for="(item, key) in odds">
      <div class="rq-item__label">
        {{ item.label }}
      </div>
      <div class="rq-item__body">
        <RqMatchResult :match="match" :results="item.results" />
      </div>
    </div>
    <div class="rq-more" @click="state.other.showAll = !state.other.showAll">
      显示所有
      <el-icon v-if="state.other.showAll"><CaretTop /></el-icon>
      <el-icon v-else><CaretBottom /></el-icon>
    </div>
  </div>
</template>
<script setup>
import RqMatchResult from './RqMatchResult.vue'

const props = defineProps({
  match: Array,
  odds: Array,
})

const { store, state } = inject('Sell')
</script>
<style lang="scss" scoped>
.rq {
  padding: 16px 16px 12px 16px;
  border-radius: 8px;
  background-color: #f5f5f5;
  margin-top: 8px;
  overflow: hidden;
}

.rq-item {
  display: flex;
  align-items: center;
}

.rq-item__label {
  width: 80px;
  text-align: center;
  color: #252a30;
  font-weight: 600;
}

.rq-item__body {
  border-radius: 8px;
  background-color: #fff;
  flex: 1;
  padding: 0 0 0 16px;
  overflow: hidden;
  flex: 1;
  margin-bottom: 12px;
  padding-left: 170px;
}

.rq-more {
  text-align: center;
  font-size: 12px;
  color: #252a30;
  cursor: pointer;
}
</style>
